package com.heima.article.feign;

import com.heima.article.service.ApArticleService;
import com.heima.feign.article.ArticleFeignClient;
import com.heima.model.article.dtos.ArticleDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * 相当于与controller接口
 */
@RestController
@RequestMapping("/api/v1/article")
public class ArticleFeignClientImpl implements ArticleFeignClient {
@Autowired
private ApArticleService apArticleService;
    @Override
    @PostMapping("/save")
    public ResponseResult saveArticle(ArticleDto dto) {
        return apArticleService.save(dto);
    }
}